<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户管理</title>
<jsp:include page="/assets/common-css.jsp" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/user/css/user-listPage.css" />
</head>
<body>
	<div class="m-portlet m-portlet--mobile">
		<div class="m-portlet__head">
			<div class="m-portlet__head-caption">
				<div class="m-portlet__head-title">
					<h3 class="m-portlet__head-text">用户管理</h3>
				</div>
			</div>
			<div class="m-portlet__head-tools">
				<ul class="m-portlet__nav">
					<li class="m-portlet__nav-item">
						<div
							class="m-dropdown m-dropdown--inline m-dropdown--arrow m-dropdown--align-right m-dropdown--align-push"
							m-dropdown-toggle="hover" aria-expanded="true">
							<a href="#"
								class="m-portlet__nav-link btn btn-lg btn-secondary  m-btn m-btn--icon m-btn--icon-only m-btn--pill  m-dropdown__toggle">
								<i class="la la-ellipsis-h m--font-brand"></i>
							</a>
							<div class="m-dropdown__wrapper">
								<span
									class="m-dropdown__arrow m-dropdown__arrow--right m-dropdown__arrow--adjust"></span>
								<div class="m-dropdown__inner">
									<div class="m-dropdown__body">
										<div class="m-dropdown__content">
											<ul class="m-nav">
												<li class="m-nav__item">	
													<a
													href="javascript:openEditUser('新增用户', null);"
													class="m-nav__link" id="add"> <i
														class="m-nav__link-icon la la-plus"></i> <span
														class="m-nav__link-text"> 新增 </span>
													</a>
												</li>
												<li class="m-nav__item">
													<a
													href="javascript:batchDel();" class="m-nav__link"
													id="batch-del"> <i
														class="m-nav__link-icon la la-trash-o"></i> <span
														class="m-nav__link-text"> 批量删除 </span>
													</a>
												</li>
												 <li class="m-nav__item">
                                                    <a href="javascript:exportExcel('excel');" class="m-nav__link" >
                                                        <i class="m-nav__link-icon fa fa-file-excel-o"></i>
                                                        <span class="m-nav__link-text">
                                                        查询结果导出Excel
                                                    </span>
                                                    </a>
                                                </li>
                                                <li class="m-nav__item">
                                                    <a href="javascript:exportExcel('pdf');" class="m-nav__link" >
                                                        <i class="m-nav__link-icon fa fa-file-pdf-o"></i>
                                                        <span class="m-nav__link-text">
                                                        查询结果导出PDF
                                                    </span>
                                                    </a>
                                                </li>
                                                 </li>
                                                <li class="m-nav__item">
                                                    <a href="javascript:exportPirnt()" class="m-nav__link" >
                                                        <i class="m-nav__link-icon fa fa-print"></i>
                                                        <span class="m-nav__link-text">
                                                        查询结果打印
                                                    </span>
                                                    </a>
                                                </li>
											</ul>
										</div>
									</div>
								</div>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="m-portlet__body">
			<!--begin: Search Form -->
			<div class="m-form m-form--label-align-righ">
				<div class="row align-items-center">
					<div class="col-xl-12 order-2 order-xl-1">
						<div class="form-group m-form__group row align-items-center">
							<div class="col-md-2">
								<div class="m-input-icon m-input-icon--left">
									<input type="text" class="form-control no-icon-form-control"
										placeholder="请输入用户名称" data-col-index="0" id="name">
								</div>
							</div>
							<div class="col-md-2">
								<div class="m-input-icon m-input-icon--left">
									<input type="text" class="form-control no-icon-form-control"
										placeholder="请输入用户编码" data-col-index="0" id="code">
								</div>
							</div>
							<div class="col-md-2">
								<div class="m-input-icon m-input-icon--left">
									<input type="text" class="form-control no-icon-form-control"
										placeholder="请输入手机号" data-col-index="0" id=mobile>
								</div>
							</div>
							<div class="col-md-3">
								<div class="m-input-icon m-input-icon--left">
									<select class="form-control m-selet2" id="airlineCode"
										placeholder="请填写航司">
										<option></option>
									</select>
								</div>
							</div>
							<div class="col-md-3">
								<button class="btn btn-brand m-btn m-btn--icon" id="m_search">
									<span> <i class="la la-search"></i> <span> 查询 </span>
									</span>
								</button>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--end: Search Form -->
			<!--begin: Datatable -->
			<div class="m_datatable" id="user_data"></div>
			<!--end: Datatable -->
		</div>
	</div>
	<jsp:include page="/assets/common/print/common-print.jsp" />
	<jsp:include page="/assets/common-js.jsp" />
	<script src="<%=request.getContextPath()%>/user/js/model-listPage.js"></script>
</body>
<script id="editHtml" type="text/html">
    <div class="m-form m-form--fit m-form--label-align-right layer-div  layui-form"  id ="user-form">
        <div class="m-portlet__body">
            <input type="hidden" id="edit_id">
            <div class="form-group m-form__group row">
                <label class="col-lg-3 col-form-label">
                    用户名 <font color="red">*</font>
                </label>
                <div class="col-lg-8">
                    <input type="text" name ="name" class="form-control" required lay-verify="required|username"
                             placeholder="请输入用户名">
                </div>
            </div>
            <div class="form-group m-form__group row">
                <label class="col-lg-3 col-form-label">
                    用户编码 <font color="red">*</font>
                </label>
                <div class="col-lg-8">
                    <input type="text" name ="code" class="form-control" required lay-verify="required"
                              placeholder="请输入用户编码">
                </div>
            </div>
			<div class="form-group m-form__group row" id = "edit-userType-div">
                <label class="col-lg-3 col-form-label">
                    用户类型 <font color="red">*</font>
                </label>
                <div class="col-lg-8">
                    <select  name ="userType" class="form-control m-select2" required lay-verify="required"
                              placeholder="请输入用户类型">
                    </select>
                </div>
            </div>
           <div class="form-group m-form__group row" id = "edit-airlineCode-div" style ="display:none;">
                <label class="col-lg-3 col-form-label">
                      航司 
                </label>
                <div class="col-lg-8">
                    <select name ="airlineCode" class="form-control m-select2" 
                              placeholder="请输入航司"></select>
                </div>
            </div>
            <div class="form-group m-form__group row password">
                <label class="col-lg-3 col-form-label">
                  密码<font color="red">*</font>
                </label>
                <div class="col-lg-8">
                    <input type="password" name ="password" class="form-control" required lay-verify="required|password"
                            placeholder="请输入密码">
                </div>
            </div>
         <div class="form-group m-form__group row">
                <label class="col-lg-3 col-form-label">
                    性别 
                </label>
                <div class="col-lg-8">
                   <select name="gender" class="form-control m-select2" ></select>
                </div>
            </div>
           <div class="form-group m-form__group row">
                <label class="col-lg-3 col-form-label">
                    座机 
                </label>
                <div class="col-lg-8">
                    <input type="text" name ="telephone" class="form-control" 
                           placeholder="请输入座机">
                </div>
            </div>
           <div class="form-group m-form__group row">
                <label class="col-lg-3 col-form-label">
                   手机号
                </label>
                <div class="col-lg-8">
                    <input type="text" name ="mobile" class="form-control" 
                           placeholder="请输入手机号">
                </div>
            </div>
            <div class="form-group m-form__group row">
                <label class="col-lg-3 col-form-label">
                   邮箱
                </label>
                <div class="col-lg-8">
                    <input type="text" name ="email" class="form-control" 
                            placeholder="请输入邮箱">
                </div>
            </div>
        </div>
        <div class="m-portlet__foot m-portlet__foot--fit">
            <div class="m-form__actions m-form__actions">
                <div class="row">
                    <div class="col-lg-12 ml-lg-auto">
                        <button id="edit_cancle" class="btn btn-secondary m--pull-right">
                            取消
                        </button>
                        <button id="edit_yes" lay-submit lay-filter="save_user" class="btn btn-brand m--pull-right">
                            确定
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script id="gender-select-template" type="text/html">
    {{#  layui.each(d.list, function(index, item){ }}
    <option value="{{item.id}}">{{item.text}}</option>
    {{#  }); }}
</script>
<script id="userType-select-template" type="text/html">
    {{#  layui.each(d.list, function(index, item){ }}
    <option value="{{item.id}}">{{item.text}}</option>
    {{#  }); }}
</script>
</html>